<h1 align="center">Horarios</h1>
<h3 align="center">Horarios por grupos </h3>
<div class="area" align="center">
<?php
	echo $this->Form->create();
    echo $this->Form->input('Asignaturas');
    echo $this->Form->end('Buscar');
?>
</div>
</br>
<div class="area" align="center">

  <table>
   <thead> <tr>
      <th width="100">Id Asignatura</th>
	  <th width="54">Id Ciclo</th>
      <th width="54">A&ntilde;o</th>
      <th width="54">Tipo Grupo</th>
      <th width="54">N&uacute;mero grupo</th>
      <th width="54">Horas Grupo</th>
      <th width="54">Accion</th>
      </tr></thead>
    
    <!-- Here is where we loop through our $posts array, printing out post info -->
    
    <?php foreach ($Horariosgrupos as $horario): ?>
    <tbody><tr>
	  <td><div align="left"><?php echo $horario[0]['idasignatura']; ?></div></td>
	  <td><div align="justify"><?php echo $horario[0]['idciclo']; ?></div></td>
      <td><div align="center"><?php echo $horario[0]['anio']; ?></div></td>
      <td><div align="center"><?php echo $horario[0]['tipogrupo']; ?></div></td>
      <td><div align="center"><?php echo $horario[0]['numerogrupo']; ?></div></td>
      <td><div align="center"><?php echo $horario[0]['horasgrupo']; ?></div></td>
      <td><div align="center">  
      <?php echo $this->Html->link('Editar', array('action' => 'editarhorario', $horario[0]['idhorario']));?>
      <?php if($horario[0][0]['count']==0){echo $this->Form->postLink('Eliminar', array('action' => 'eliminarhorario', $horario[0]['idhorario']), array('confirm' => 'Esta seguro?'));} ?>
      </div></td>
      </tr></tbody>
    <?php endforeach; ?>
    
  </table>
  
 </div>
 </br>
 <div class="area" align="left">
 <?php echo $this->Html->link('Crear horario', array('action' => 'crearhorario'));?>
</div>
</br>